package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallGoodsAssociate;
import com.appkubes.mall.core.po.MallGoodsAssociateExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallGoodsAssociateMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsAssociateSqlProvider.class, method="countByExample")
    long countByExample(MallGoodsAssociateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallGoodsAssociateSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallGoodsAssociateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_goods_associate",
        "where associate_key = #{associateKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String associateKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_goods_associate (associate_key, app_key, ",
        "good_key, associate_good_key, ",
        "create_time, update_time, ",
        "version)",
        "values (#{associateKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{goodKey,jdbcType=VARCHAR}, #{associateGoodKey,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallGoodsAssociate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallGoodsAssociateSqlProvider.class, method="insertSelective")
    int insertSelective(MallGoodsAssociate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsAssociateSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="associate_key", property="associateKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_key", property="goodKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="associate_good_key", property="associateGoodKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsAssociate> selectByExampleWithRowbounds(MallGoodsAssociateExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsAssociateSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="associate_key", property="associateKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_key", property="goodKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="associate_good_key", property="associateGoodKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsAssociate> selectByExample(MallGoodsAssociateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "associate_key, app_key, good_key, associate_good_key, create_time, update_time, ",
        "version",
        "from mall_goods_associate",
        "where associate_key = #{associateKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="associate_key", property="associateKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="good_key", property="goodKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="associate_good_key", property="associateGoodKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallGoodsAssociate selectByPrimaryKey(String associateKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsAssociateSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallGoodsAssociate record, @Param("example") MallGoodsAssociateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsAssociateSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallGoodsAssociate record, @Param("example") MallGoodsAssociateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsAssociateSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallGoodsAssociate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_associate
     *
     * @mbg.generated
     */
    @Update({
        "update mall_goods_associate",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "good_key = #{goodKey,jdbcType=VARCHAR},",
          "associate_good_key = #{associateGoodKey,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where associate_key = #{associateKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallGoodsAssociate record);
}